<template>
	<view class="appraise">
		<view class="company">
			<image class="left-icon" :src="require('@/static/images/will/zzlogo.png')"></image>
			<view class="right">
				<view class="title">{{companyName}}</view>
				<view class="desc">服务项目：{{desc}}</view>
			</view>
		</view>
		<view class="start">
			<view class="title">请对本次的服务进行评价</view>
			<uni-rate :value="value" margin="8" />
		</view>
		<view class="content">
			<uni-forms :modelValue="formData" ref="form">
				<uni-forms-item name="content" label=" ">
					<uni-easyinput v-model="formData.content" :clearable="false" type="textarea"
						placeholder="请输入评价内容文字信息" />
				</uni-forms-item>
			</uni-forms>
			<view class="imgGroups">
				<image class="camera-box"  v-for="(item,index) in images" :key="index" :src="item.src" ></image>
				<view class="camera-box">
					<image class="camera-icon" :src="require('@/static/images/will/camera.png')" @click="chooseFile()"></image>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				value: 4,
				companyName: '郑州科技科技',
				desc: '代书遗嘱',
				formData: {
					content: ''
				},
				images:[
					// {src:require('@/static/images/will/camera.png')}
				]
			}
		},
		methods: {
			/* 
			 * 上传文件类型
			 */
			chooseFile() {
				uni.chooseImage({
					count: 6, //默认9
					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图，默认二者都有
					sourceType: ['album'], //从相册选择
					success: function (res) {
						console.log(JSON.stringify(res.tempFilePaths));
					}
				});
			},
		}
	}
</script>

<style lang="scss" scoped>
	.appraise {
		padding: 0 22rpx;

		.company {
			padding-top: 18rpx;
			display: flex;

			.left-icon {
				width: 96rpx;
				height: 96rpx;
				border-radius: 10rpx;
				margin-right: 23rpx;
			}

			.right {
				display: flex;
				flex-direction: column;
				justify-content: space-evenly;

				.title {
					font-size: 30rpx;
					font-family: PingFang SC;
					font-weight: bold;
					color: #333333;
				}

				.desc {
					font-size: 22rpx;
					font-family: PingFang SC;
					font-weight: 500;
					color: #53B3D9;
				}
			}
		}

		.start {
			height: 334rpx;
			display: flex;
			flex-direction: column;
			justify-content: center;
			justify-items: center;
			align-items: center;

			.title {
				font-size: 36rpx;
				font-family: PingFang SC;
				font-weight: bold;
				color: #000000;
				padding-bottom: 26rpx;
			}
		}

		.content {
			min-height: 376rpx;
			border: 1rpx solid #E7E7E7;
			border-radius: 10rpx;
			padding: 38rpx;
			/deep/.uni-forms-item__label{
				display: none;
			}
			/deep/.is-input-border {
				border: none;
				outline: none;
			}

			/deep/.input-padding {
				padding: 0;
			}

			/deep/.uni-easyinput__placeholder-class {
				font-size: 26rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #999999;
			}
			.imgGroups{
				display: flex;
			}
			.camera-box {
				width: 100rpx;
				height: 100rpx;
				background: #F8F8F8;
				border-radius: 10rpx;
				display: flex;
				justify-content: center;
				justify-items: center;
				align-items: center;
				margin-left: 10rpx;
				&:first-child{
					margin-left: 0;
				}
				.camera-icon {
					width: 53rpx;
					height: 45rpx;
				}
			}
		}
	}
</style>
